package day04_api_code.com.itheima.d5_jdk8_time;

import java.time.LocalTime;

public class Test2_LocalTime {
    public static void main(String[] args) {
        LocalTime lt = LocalTime.now();
        System.out.println("lt = " + lt);

        System.out.println("lt.getHour() = " + lt.getHour());
        System.out.println("lt.getMinute() = " + lt.getMinute());
        System.out.println("lt.getSecond() = " + lt.getSecond());
        System.out.println("lt.getNano() = " + lt.getNano());

        System.out.println("lt.withHour(21) = " + lt.withHour(21));
        System.out.println("lt.withMinute(10) = " + lt.withMinute(10));
        System.out.println("lt.withSecond(20) = " + lt.withSecond(20));
        System.out.println("lt.withNano(10) = " + lt.withNano(10));

        System.out.println("lt.plusHours(10) = " + lt.plusHours(10));
        System.out.println("lt.plusMinutes(10) = " + lt.plusMinutes(10));
        System.out.println("lt.plusSeconds(10) = " + lt.plusSeconds(10));
        System.out.println("lt.plusNanos(10) = " + lt.plusNanos(10));

        System.out.println("lt.minusHours(10) = " + lt.minusHours(10));
        System.out.println("lt.minusMinutes(10) = " + lt.minusMinutes(10));
        System.out.println("lt.minusSeconds(10) = " + lt.minusSeconds(10));
        System.out.println("lt.minusNanos(10) = " + lt.minusNanos(10));

        System.out.println("LocalTime.of(12, 12, 12) = " + LocalTime.of(12, 12, 12));
        System.out.println("LocalTime.of(12, 12, 12) = " + LocalTime.of(12, 12, 12));

        System.out.println("lt.minusHours(10).equals(lt.minusSeconds(10)) = " + lt.minusHours(10).equals(lt.minusSeconds(10)));
        System.out.println("lt.isAfter(lt.minusMinutes(10)) = " + lt.isAfter(lt.minusMinutes(10)));
        System.out.println("lt.isBefore(lt.minusMinutes(10)) = " + lt.isBefore(lt.minusMinutes(10)));
    }
}
